ccrTimer = {
	frame = CreateFrame("frame"),
	events = { },
	Register = function(name, callback, interval)
		-- make sure one of this name doesn't exist already
		if not ccrTimer.events[name] then
			local event = { }
			event.callback = callback
			event.interval = interval
			event.elapsed = 0
			ccrTimer.events[name] = event
			return true
		end
		return false
	end,
	Unregister = function(name)
		if ccrTimer.events[name] then
			ccrTimer.events[name] = nil
			return true
		end
		return false
	end,
	OnUpdate = function(self, elapsed)
		if not FireHack then return end
		for name, event in pairs(ccrTimer.events) do
			event.elapsed = event.elapsed + elapsed
			if event.elapsed > event.interval then
				event.callback()
				event.elapsed = 0
			end
		end
	end,
	init = function()
		ccrTimer.frame:SetScript("OnUpdate", ccrTimer.OnUpdate)
	end
}
ccrTimer.init()

--[[
ccrTimer.Register('patchFireHack', function()
	if not FireHackObjectCache then FireHackObjectCache = {} end
	function Object:init (GUID)
	   if not FireHackObjectCache[GUID] then
	      --print('Object Init')
	      self.GUID = GUID;
	      if FireHackObjectCache[GUID] ~= nil then
		      FireHackObjectCache[GUID] = self
		  end
	      return self;
	   else
	      --print('Object Cached')
	      return FireHackObjectCache[GUID]
	   end
	end
	ccrTimer.Unregister('patchFireHack')
end, 500)]]